<template>
    <div>
        <el-pagination
                :locale="locale"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page.sync="currentPage"
                :page-sizes="[10, 20, 30, 40]"
                :page-size="pageSzie"
                layout="sizes, prev, pager, next"
                :total="total">
        </el-pagination>
    </div>
</template>

<script>
    import zhCn from 'element-plus/lib/locale/lang/zh-cn'
    export default {
        name: "page",
        props: {
            pageSzie:{
                type:Number
            },
            currentPage: {
                type: Number
            },
            total: {
                type:Number
            }
        },
        data() {
            return {
                locale:zhCn
            };
        },
        methods: {
            handleSizeChange(val) {
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                console.log(`当前页: ${val}`);
            }
        },
    }
</script>

<style scoped>

</style>
